/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.ad.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.entity.TreeEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 行业类型表(ad_industry_type)Entity
 * @author jjj
 * @version 2019-05-07
 */
@Table(name="ad_industry_type", alias="a", columns={
		@Column(name="industry_code", attrName="industryCode", label="行业编码", isPK=true),
		@Column(includeEntity=TreeEntity.class),
		@Column(name="industry_name", attrName="industryName", label="行业类型名称", queryType=QueryType.LIKE, isTreeName=true),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.tree_sorts, a.industry_code"
)
public class AdIndustryType extends TreeEntity<AdIndustryType> {
	
	private static final long serialVersionUID = 1L;
	private String industryCode;		// 行业编码
	private String industryName;		// 行业类型名称
	
	public AdIndustryType() {
		this(null);
	}

	public AdIndustryType(String id){
		super(id);
	}
	
	@Override
	public AdIndustryType getParent() {
		return parent;
	}

	@Override
	public void setParent(AdIndustryType parent) {
		this.parent = parent;
	}
	
	public String getIndustryCode() {
		return industryCode;
	}

	public void setIndustryCode(String industryCode) {
		this.industryCode = industryCode;
	}
	
	@NotBlank(message="行业类型名称不能为空")
	@Length(min=0, max=200, message="行业类型名称长度不能超过 200 个字符")
	public String getIndustryName() {
		return industryName;
	}

	public void setIndustryName(String industryName) {
		this.industryName = industryName;
	}
	
}